package com.example.dessert.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.example.dessert.dao.AdvertMapper;
import com.example.dessert.entity.Address;
import com.example.dessert.entity.Advert;
import com.example.dessert.service.AdvertService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @ClassName: AdvertServiceImpl
 * @Description:
 * @Author li
 * @Date 2022/1/28
 * @Version 1.0
 */
@Service
public class AdvertServiceImpl implements AdvertService {

    @Resource
    private AdvertMapper advertMapper;

    @Override
    public List<Advert> queryAdvertList() {
        QueryWrapper<Advert> wrapper = new QueryWrapper<>();
        wrapper.eq("disabled",0);
        return advertMapper.selectList(wrapper);

    }
}
